<?php
/**
 * 汇总采购需求
 */
class ProcSumHelper {
	
	/**
	 * 待做汇总的采购需求
	 */
	static function getRequests(){
		return Db::get('Demand')->select('t0.*,t1.name as user_name,t2.name as dept_name')
				->join(array('User','Dept'))->on(array('t0.user_id=t1.id','t0.dept_id=t2.id'))
				->where(array('audit_flow'=>1), array('summary_id', 'is', 'null'))
				->getAll();
	}
	

}
?>
